<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>结构伪类选择器-nth-child(公式) </title>
    <style>
        /* li:nth-child(2n){
            background-color: green;
        } */
         li:nth-child(2n+1){
            font-size: 18px;
            background-color: blue;
            color: red;
         }
    </style>
</head>
<body>
      <ul>
        <li>li 1</li>
        <li>li 2</li>
        <li>li 3</li>
        <li>li 4</li>
        <li>li 5</li>
        <li>li 6</li>
        <li>li 7</li>
        <li>li 8</li>
        <li>li 9</li>
        <li>li 10</li>
    </ul>
</body>
</html>